- Author:
- Weiwei Ai <wai484@aucklanduni.ac.nz>
- Date:
- 2024-04-08 18:20:16+12:00
- Desc:
- clean up; correct the cell volume to 0.09 pL; remove the param convertion equations in cellml; use python to do the conversion;
- Permanent Source URI:
- https://models.physiomeproject.org/workspace/b65/rawfile/d36dca3e6ed80f08a478e14a9be7695786950d7e/Electrogenic cotransporter/SGLT1_BG.txt
def model SGLT1_BG as
def import using "./units.cellml" for
unit fmol_per_s using unit fmol_per_s;
unit fmol using unit fmol;
unit fA using unit fA;
unit per_fmol using unit per_fmol;
unit C_per_mol using unit C_per_mol;
unit J_per_K_mol using unit J_per_K_mol;
unit J_per_mol using unit J_per_mol;
enddef;
def import using "params_BG.cellml" for
comp params_BG using comp params_BG;
enddef;
def comp SGLT1_BG as
var t: second;
var R: J_per_K_mol{ pub: in};
var T: kelvin{ pub: in};
var F: C_per_mol{ pub: in};
var K_Nai: per_fmol{ pub: in};
var q_init_Nai: fmol{ pub: in};
var K_Nao: per_fmol{ pub: in};
var q_init_Nao: fmol{ pub: in};
var K_Glci: per_fmol{ pub: in};
var q_init_Glci: fmol{ pub: in};
var K_Glco: per_fmol{ pub: in};
var q_init_Glco: fmol{ pub: in};
var K_1: per_fmol{ pub: in};
var q_init_1: fmol{ pub: in};
var K_2: per_fmol{ pub: in};
var q_init_2: fmol{ pub: in};
var K_3: per_fmol{ pub: in};
var q_init_3: fmol{ pub: in};
var K_4: per_fmol{ pub: in};
var q_init_4: fmol{ pub: in};
var K_5: per_fmol{ pub: in};
var q_init_5: fmol{ pub: in};
var K_6: per_fmol{ pub: in};
var q_init_6: fmol{ pub: in};
var V0_Vm: volt{ pub: in};
var z_z1: dimensionless{ pub: in};
var z_z2: dimensionless{ pub: in};
var z_z3: dimensionless{ pub: in};
var z_z4: dimensionless{ pub: in};
var kappa_r1: fmol_per_s{ pub: in};
var kappa_r2: fmol_per_s{ pub: in};
var kappa_r3: fmol_per_s{ pub: in};
var kappa_r4: fmol_per_s{ pub: in};
var kappa_r5: fmol_per_s{ pub: in};
var kappa_r6: fmol_per_s{ pub: in};
var kappa_r7: fmol_per_s{ pub: in};
var mu_Nai: J_per_mol;
var v_Nai: fmol_per_s;
var mu_Nao: J_per_mol;
var v_Nao: fmol_per_s;
var mu_Glci: J_per_mol;
var v_Glci: fmol_per_s;
var mu_Glco: J_per_mol;
var v_Glco: fmol_per_s;
var mu_1: J_per_mol;
var v_1: fmol_per_s;
var mu_2: J_per_mol;
var v_2: fmol_per_s;
var mu_3: J_per_mol;
var v_3: fmol_per_s;
var mu_4: J_per_mol;
var v_4: fmol_per_s;
var mu_5: J_per_mol;
var v_5: fmol_per_s;
var mu_6: J_per_mol;
var v_6: fmol_per_s;
var V_Vm: volt;
var V_z1: volt;
var I_z1: fA;
var mu_z1: J_per_mol;
var v_z1: fmol_per_s;
var V_z2: volt;
var I_z2: fA;
var mu_z2: J_per_mol;
var v_z2: fmol_per_s;
var V_z3: volt;
var I_z3: fA;
var mu_z3: J_per_mol;
var v_z3: fmol_per_s;
var V_z4: volt;
var I_z4: fA;
var mu_z4: J_per_mol;
var v_z4: fmol_per_s;
var A_f_r1: J_per_mol;
var v_r1: fmol_per_s;
var A_r_r1: J_per_mol;
var A_f_r2: J_per_mol;
var v_r2: fmol_per_s;
var A_r_r2: J_per_mol;
var A_f_r3: J_per_mol;
var v_r3: fmol_per_s;
var A_r_r3: J_per_mol;
var A_f_r4: J_per_mol;
var v_r4: fmol_per_s;
var A_r_r4: J_per_mol;
var A_f_r5: J_per_mol;
var v_r5: fmol_per_s;
var A_r_r5: J_per_mol;
var A_f_r6: J_per_mol;
var v_r6: fmol_per_s;
var A_r_r6: J_per_mol;
var A_f_r7: J_per_mol;
var v_r7: fmol_per_s;
var A_r_r7: J_per_mol;
var q_Nai: fmol{ init: q_init_Nai};
var q_Nao: fmol{ init: q_init_Nao};
var q_Glci: fmol{ init: q_init_Glci};
var q_Glco: fmol{ init: q_init_Glco};
var q_1: fmol{ init: q_init_1};
var q_2: fmol{ init: q_init_2};
var q_3: fmol{ init: q_init_3};
var q_4: fmol{ init: q_init_4};
var q_5: fmol{ init: q_init_5};
var q_6: fmol{ init: q_init_6};
mu_Nai = R*T*ln(K_Nai*q_Nai);
ode(q_Nai,t) = v_Nai;
mu_Nao = R*T*ln(K_Nao*q_Nao);
ode(q_Nao,t) = v_Nao;
mu_Glci = R*T*ln(K_Glci*q_Glci);
ode(q_Glci,t) = v_Glci;
mu_Glco = R*T*ln(K_Glco*q_Glco);
ode(q_Glco,t) = v_Glco;
mu_1 = R*T*ln(K_1*q_1);
ode(q_1,t) = v_1;
mu_2 = R*T*ln(K_2*q_2);
ode(q_2,t) = v_2;
mu_3 = R*T*ln(K_3*q_3);
ode(q_3,t) = v_3;
mu_4 = R*T*ln(K_4*q_4);
ode(q_4,t) = v_4;
mu_5 = R*T*ln(K_5*q_5);
ode(q_5,t) = v_5;
mu_6 = R*T*ln(K_6*q_6);
ode(q_6,t) = v_6;
V_Vm=V0_Vm;
mu_z1=z_z1*F*V_z1;
I_z1=z_z1*F*v_z1;
mu_z2=z_z2*F*V_z2;
I_z2=z_z2*F*v_z2;
mu_z3=z_z3*F*V_z3;
I_z3=z_z3*F*v_z3;
mu_z4=z_z4*F*V_z4;
I_z4=z_z4*F*v_z4;
v_r1 = kappa_r1*(exp(A_f_r1/(R*T)) - exp(A_r_r1/(R*T)));
v_r2 = kappa_r2*(exp(A_f_r2/(R*T)) - exp(A_r_r2/(R*T)));
v_r3 = kappa_r3*(exp(A_f_r3/(R*T)) - exp(A_r_r3/(R*T)));
v_r4 = kappa_r4*(exp(A_f_r4/(R*T)) - exp(A_r_r4/(R*T)));
v_r5 = kappa_r5*(exp(A_f_r5/(R*T)) - exp(A_r_r5/(R*T)));
v_r6 = kappa_r6*(exp(A_f_r6/(R*T)) - exp(A_r_r6/(R*T)));
v_r7 = kappa_r7*(exp(A_f_r7/(R*T)) - exp(A_r_r7/(R*T)));
v_Nai = v_r5*2{dimensionless};
v_Nao = - v_r1*2{dimensionless};
v_Glci = v_r4;
v_Glco = - v_r2;
v_1 = v_r6 - v_r1;
v_2 = v_r1 - v_r2+v_r7;
v_3 = v_r2 - v_r3;
v_4 = v_r3 - v_r4;
v_5 = v_r4+v_r7 - v_r5;
v_6 = v_r5 - v_r6;
V_z1 = V_Vm;
v_z1 = v_r1;
V_z2 = V_Vm;
v_z2 = v_r1;
V_z3 = V_Vm;
v_z3 = v_r6;
V_z4 = V_Vm;
v_z4 = v_r6;
A_f_r1 = mu_Nao*2{dimensionless}+mu_1 - mu_z2;
A_r_r1 = mu_2+mu_z1;
A_f_r2 = mu_Glco+mu_2;
A_r_r2 = mu_3;
A_f_r3 = mu_3;
A_r_r3 = mu_4;
A_f_r4 = mu_4;
A_r_r4 = mu_Glci+mu_5;
A_f_r5 = mu_5;
A_r_r5 = mu_Nai*2{dimensionless}+mu_6;
A_f_r6 = mu_6 - mu_z4;
A_r_r6 = mu_1+mu_z3;
A_f_r7 = mu_2;
A_r_r7 = mu_5;
enddef;
def map between params_BG and SGLT1_BG for
vars R and R;
vars T and T;
vars F and F;
vars K_Nai and K_Nai;
vars q_init_Nai and q_init_Nai;
vars K_Nao and K_Nao;
vars q_init_Nao and q_init_Nao;
vars K_Glci and K_Glci;
vars q_init_Glci and q_init_Glci;
vars K_Glco and K_Glco;
vars q_init_Glco and q_init_Glco;
vars K_1 and K_1;
vars q_init_1 and q_init_1;
vars K_2 and K_2;
vars q_init_2 and q_init_2;
vars K_3 and K_3;
vars q_init_3 and q_init_3;
vars K_4 and K_4;
vars q_init_4 and q_init_4;
vars K_5 and K_5;
vars q_init_5 and q_init_5;
vars K_6 and K_6;
vars q_init_6 and q_init_6;
vars V0_Vm and V0_Vm;
vars z_z1 and z_z1;
vars z_z2 and z_z2;
vars z_z3 and z_z3;
vars z_z4 and z_z4;
vars kappa_r1 and kappa_r1;
vars kappa_r2 and kappa_r2;
vars kappa_r3 and kappa_r3;
vars kappa_r4 and kappa_r4;
vars kappa_r5 and kappa_r5;
vars kappa_r6 and kappa_r6;
vars kappa_r7 and kappa_r7;
enddef;
enddef;